package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * TheoreticalGrade generated by hbm2java
 */
@Entity
@Table(name = "theoretical_grade")
public class TheoreticalGrade implements java.io.Serializable {

	private long id;
	private Student student;
	private String licenceNumber;
	private Float grade;
	private Boolean isPassed;
	private Date examDate;

	public TheoreticalGrade() {
	}

	public TheoreticalGrade(Student student, String licenceNumber) {
		this.student = student;
		this.licenceNumber = licenceNumber;
	}

	public TheoreticalGrade(Student student, String licenceNumber, Float grade,
			Boolean isPassed, Date examDate) {
		this.student = student;
		this.licenceNumber = licenceNumber;
		this.grade = grade;
		this.isPassed = isPassed;
		this.examDate = examDate;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "student"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Column(name = "LICENCE_NUMBER", nullable = false, length = 20)
	public String getLicenceNumber() {
		return this.licenceNumber;
	}

	public void setLicenceNumber(String licenceNumber) {
		this.licenceNumber = licenceNumber;
	}

	@Column(name = "GRADE", precision = 12, scale = 0)
	public Float getGrade() {
		return this.grade;
	}

	public void setGrade(Float grade) {
		this.grade = grade;
	}

	@Column(name = "IS_PASSED")
	public Boolean getIsPassed() {
		return this.isPassed;
	}

	public void setIsPassed(Boolean isPassed) {
		this.isPassed = isPassed;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "EXAM_DATE", length = 19)
	public Date getExamDate() {
		return this.examDate;
	}

	public void setExamDate(Date examDate) {
		this.examDate = examDate;
	}

}
